#pragma once

#include "includeBase.h"
#include "../common/BasePclModel.h"

class ImplicitShapeModel : public BasePclModel
{
public:
    ImplicitShapeModel();

public:
    static ImplicitShapeModel& get();

public: // IJsonSerializable
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    QJsonObject toJson() const override;

public: // Property
    QString trainingFile() const { return trainingFile_; }
    void setTrainingFile(const QString& file) { trainingFile_ = file; }

    QString trainingFile2() const { return trainingFile2_; }
    void setTrainingFile2(const QString& file) { trainingFile2_ = file; }

    QString trainingFile3() const { return trainingFile3_; }
    void setTrainingFile3(const QString& file) { trainingFile3_ = file; }

    QString trainingFile4() const { return trainingFile4_; }
    void setTrainingFile4(const QString& file) { trainingFile4_ = file; }

    QString trainingFile5() const { return trainingFile5_; }
    void setTrainingFile5(const QString& file) { trainingFile5_ = file; }

    QString testingFile() const { return testingFile_; }
    void setTestingFile(const QString& file) { testingFile_ = file; }

    double normalRadiusSearch() const { return normalRadiusSearch_; }
    void setNormalRadiusSearch(double radius) { normalRadiusSearch_ = radius; }

    double fpfhRadiusSearch() const { return fpfhRadiusSearch_; }
    void setFpfhRadiusSearch(double radius) { fpfhRadiusSearch_ = radius; }

    double samplingSize() const { return samplingSize_; }
    void setSamplingSize(double size) { samplingSize_ = size; }

    double ismRadiusRatio() const { return ismRadiusRatio_; }
    void setIsmRadiusRatio(double ratio) { ismRadiusRatio_ = ratio; }

    int testingCloudPointSize() const { return testingCloudPointSize_; }
    void setTestingCloudPointSize(int size) { testingCloudPointSize_ = size; }

    QColor testingCloudPointColor() const { return testingCloudPointColor_; }
    void setTestingCloudPointColor(const QColor& color)
    {
        testingCloudPointColor_ = color;
    }

    QColor peakPointColor() const { return peakPointColor_; }
    void setPeakPointColor(const QColor& color) { peakPointColor_ = color; }

private:
    QString trainingFile_ = "data/tutorials/ism_train_cat.pcd";
    QString trainingFile2_ = "data/tutorials/ism_train_horse.pcd";
    QString trainingFile3_ = "data/tutorials/ism_train_lioness.pcd";
    QString trainingFile4_ = "data/tutorials/ism_train_michael.pcd";
    QString trainingFile5_ = "data/tutorials/ism_train_wolf.pcd";
    QString testingFile_ = "data/tutorials/ism_test_cat.pcd";

    double normalRadiusSearch_ = 25.0;
    double fpfhRadiusSearch_ = 30.0;
    double samplingSize_ = 2.0;
    double ismRadiusRatio_ = 10.0;

    int testingCloudPointSize_ = 4;
    QColor testingCloudPointColor_ = Qt::blue;
    QColor peakPointColor_ = Qt::green;
};
